import React from 'react';  
import './MyModal.css';
  
const MyModal = ({ isOpen, onClose, children }) => {  
  if (!isOpen) return null;  
  
  return (  
    <div className="modal">  
      <div className="modal-content">  
        <span className="close" onClick={onClose}>×</span>  
        {children}  
      </div>  
    </div>  
  );  
};  
  
export default MyModal;